package com.hzncc.flowable_diboot.vo;

import com.diboot.core.binding.annotation.BindDict;
import com.diboot.core.binding.annotation.BindField;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamOrg;
import com.diboot.iam.entity.IamUser;
import com.hzncc.flowable_diboot.entity.Business;
import com.hzncc.flowable_diboot.entity.BusinessContact;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
/**
* 商机联系人 VO定义
* @author MyName
* @version 1.0
* @date 2024-06-13
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class BusinessContactListVO extends BusinessContact  {
private static final long serialVersionUID = 1693389061067492209L;
    /**
    * 性别 关联字典选项
    */
    @BindDict(
    type = "GENDER",
    field = "sex"
    )
    private LabelValue sexLabel;

    /**
    * 商机 关联信息
    */

    @BindField(
        entity = Business.class,
        field = "name",
        condition = "this.business_id = id"
     )
    private String businessIdLabel;

    /**
    * 负责人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.uid = id"
     )
    private String uidLabel;

    /**
    * 负责人部门 关联信息
    */

    @BindField(
        entity = IamOrg.class,
        field = "name",
       condition = "this.uid = dbt_iam_user.id and dbt_iam_user.org_id = id"
     )
    private String dept;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

}